﻿using UnityEngine;
using System;
using System.Collections;
using UnityEngine.UI;

public class VUILoadingIndicate : MonoBehaviour 
{

	public Image bg;
	public Image indicate;
	public Text t;


	private int referencecount = 0;

	public void show(){
		referencecount++;
		if (referencecount > 0) {
			gameObject.SetActive (true);
		}
	}

	public void hide(){
		referencecount--;

		if (referencecount <= 0) {
			gameObject.SetActive (false);
		}
	}

	void Update()
	{
		if (gameObject.activeSelf) {
			indicate.transform.Rotate (new Vector3(0,0,-15));
		}


	}
}